<template>
  <p>
    {{msg}}
    <router-link to="/"><button>home</button></router-link>
    <router-link to="/test"><button>test</button></router-link>
    <router-link to="/hello"><button>hello</button></router-link>
    <router-link to="/beforeCreate"><button>beforeCreate</button></router-link>
    <router-link to="/computed"><button>computed</button></router-link>
    <router-link to="/less"><button>less</button></router-link>
    <el-button @click="element">element</el-button>
    <el-button @click="router.push({path:'/axios'})">axios</el-button>
  </p>
</template>
<script setup lang="ts">
  import { useRouter } from 'vue-router'
  defineProps<{ msg: string }>()
  const router = useRouter()
  const element=()=>{
    router.push({path:'/element'})
  }
</script>